<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>Title</title>
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}" media="all"/>
    <script type="text/javascript" th:src="@{/js/jquery-3.2.1.js}"></script>
    <script th:src="@{/layui/layui.all.js}" charset="utf-8"></script>

</head>
<body>
<table id="LAY_table_user" lay-filter="demo"></table>


<script>
    layui.use('table', function() {
        var table = layui.table;
        //方法级渲染
        table.render({
            elem: '#LAY_table_user'
            , url: '/dor/jifenPM'
            , cols: [[
                {checkbox: true, fixed: true}
                /*, {field: 'id', title: 'ID', width: 120, sort: true, fixed: true}*/
                , {field: 'fang', title: '寝室号', width: 180, sort: true}
                , {field: 'score', title: '积分', width: 180, sort: true}
                /* , {field: '', title: '操作', width: 135, toolbar: '#barDemo'}*/
            ]]
            , id: 'LAY_table_user'
            , page: true
            , height: 0
        });

        /*var $ = layui.$, active = {
            reload: function(){
                var query2 = $('#r_id').val()
                table.reload('LAY_table_user', {
                    where: {
                        rid : query2
                    }
                });
            }
        };

        $('#ss').on('click', function(e){
            e.preventDefault()
            var type = $(this).data('type');
            active[type] ? active[type].call(this) : '';
        });*/
    })
</script>
</body>
</html>